<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    var date1 = new Date()
    console.log(date1)
    console.log(date1.toString())
    console.log(date1.valueOf())
    console.log(date1.getDate())
    console.log(date1.getDay())
    console.log(date1.getMonth())
    console.log(date1.getTime())

    var date2 = new Date('2017-8-28 14:05:38');
    console.log(date2)

</script>
</body>
</html>